use std::io::{Result};
use std::path::{Path,PathBuf};
use std::fs;

pub fn list_files(dir: &Path) -> Result<Vec<PathBuf>> {
    fs::read_dir(dir)?
    .map(|res| res.map(|e| e.path()))
    .collect::<Result<Vec<_>>>()
}